<template>
	<view>
		<web-view :src="url"></web-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url: '',
				goods_id: '',
				activity_id: '',
				order_sn: ''
			};
		},
		onLoad(options) {
			// goods_id   activity_id
			if(options.goods_id) {
				this.goods_id = options.goods_id;
				this.activity_id = options.activity_id;
			}
			if(options.order_sn) {
				this.order_sn = options.order_sn;
			}
			this.loadData();
		},
		methods: {
			loadData() {
				this.$api.post(global.apiUrls.postChaturl, {
					store_id: 1,
					goods_id: this.goods_id,
					order_sn: this.order_sn
				}).then(res => {
					if (res.data.code == 1) {
						this.url = res.data.data.chat_url;
					} else {
						
					}
				}).catch(err => {
					
				});
			}
		}
	}
</script>

<style lang="scss">

</style>
